A data write process and a data erasing process for a nonvolatile memory, such as a NAND flash memory, apply a high voltage between a substrate and a control gate to charge or discharge electrons into and from a charge storage layer. When the data write process and the erasing process are performed for the nonvolatile memory a plurality of times, a gate insulating film around the charge storage layer deteriorates and the reliability of the nonvolatile memory is likely to be reduced.